<div class="panel panel-default  panel-info">
        <div class="panel-heading" style="padding-bottom: 0;">
            <ul class="nav nav-tabs">

				{if($auth->check('facrm/customer/record/index'))}
                <li><a href="#bulletin" role="tab" data-toggle="tab">{:__('跟进记录')}</a></li>
				{/if}
				{if($auth->check('service/log/index'))}
                <li><a href="#service" role="tab" data-toggle="tab">{:__('客情记录')}</a></li>
				{/if}
				{if($auth->check('note/day/index'))}
                <li><a href="#note" role="tab" data-toggle="tab">{:__('成长记录')}</a></li>
				{/if}
				{if($auth->check('workteam/project/index'))}
				<li><a href="#project" role="tab" data-toggle="tab">{:__('项目')}</a></li>
				{/if}
                {if($auth->check('facrm/customer/contacts/index'))}
				<li><a href="#forum" role="tab" data-toggle="tab">联系人</a></li>
				{/if}
				{if($auth->check('survey/records/index'))}
				<li><a href="javascript:;" data-url="{:url('survey.records/answers',['id'=>$row.survey.id])}" class="btn-dialog" data-area='["80%","80%"]' title="初步调研">{:__('初步调研')}</a></li>
				{/if}
				{if($auth->check('assess/point/index'))}
				<!--<li><a href="{$Think.config.admin.v1_admin}assess.assess/index.html?customer_id={$row.id}" target="_blank" >{:__('28项评估')}</a></li>-->
                <li><a href="#assess" id="assess-tab" role="tab"  data-toggle="tab">{:__('28项评估')}</a></li>
				<li><a href="{$Think.config.admin.v1_admin}ohcards.identify/index.html?customer_id={$row.id}" target="_blank">{:__('360识人')}</a></li>
				{/if}

                {if($auth->check('facrm/business/index'))}
                <li><a href="#business" role="tab"  data-toggle="tab">{:__('商机')}</a></li>
                {/if}
                {if($auth->check('facrm/customer/index/contractlist'))}
                <li><a href="#contract" role="tab"  data-toggle="tab">{:__('合同')}</a></li>
                {/if}
                {if($auth->check('facrm/customer/index/receivableslist'))}
                <li><a href="#receivables" role="tab"  data-toggle="tab">{:__('回款')}</a></li>
                {/if}
				{if($auth->check('facrm/customer/record/files'))}
                <li><a href="#files12" role="tab"  data-toggle="tab">{:__('附件')}</a></li>
				{/if}
                {if($auth->check('facrm/operatelog/index'))}
                <li><a href="#" onclick="javascript:parent.Fast.api.open('facrm/operatelog/index/customer_id/{$row.id}',__('操作日志-')+'{$row.name}');" >{:__('日志')}</a></li>
                {/if}
                {if($auth->check('facrm/customer/record/calllog'))}
                <li><a href="#" onclick="javascript:Fast.api.open('facrm/customer/record/calllog?customer_id={$row.id}',__('通话记录-')+'{$row.name}');" >{:__('通话记录')}</a></li>
                {/if}

            </ul>
        </div>
        <div class="panel-body">
            <div id="myTabContent" class="tab-content">
				{if($auth->check('facrm/customer/record/index'))}
                <!-- 跟进记录开始-->
                <div class="tab-pane fade" id="bulletin">
					<div id="toolbar1" class="toolbar ">
						<a href="javascript:;" class="btn btn-primary btn-refresh"><i class="fa fa-refresh"></i></a>
						{if($auth->check('facrm/customer/record/add'))}
						<a href="javascript:;" data-url="facrm/customer/record/add/ids/{:input('ids')}" class="btn btn-success  btn-dialog "
						   title="添加跟进"><i class="fa fa-plus"></i> 添加跟进</a>
						{/if}
					</div>
                    <table id="tableflow" class="table table-striped table-bordered table-hover table-nowrap" width="100%"></table>
                    <!-- 修改 amplam2018年8月11日 15:40:05--->
                </div>
                <!-- 跟进记录结束-->
				{/if}
				{if($auth->check('service/log/index'))}
                <!-- 客情记录开始-->
                <div class="tab-pane fade" id="service">
					<div id="service-bar" class="toolbar ">
						<a href="javascript:;" class="btn btn-primary btn-refresh"><i class="fa fa-refresh"></i></a>
						{if($auth->check('service/log/add'))}
						<a href="javascript:;" data-url="service/log/add/customer_id/{:input('ids')}" class="btn btn-success  btn-dialog "
						   title="添加客情记录"><i class="fa fa-plus"></i> 添加客情记录</a>
						{/if}
					</div>
                    <table id="service-table" class="table table-striped table-bordered table-hover table-nowrap"
                           data-operate-edit1="{:$auth->check('service/log/edit')}"
                           data-operate-del1="{:$auth->check('service/log/del')}"
						   width="100%"></table>
                </div>
                <!-- 客情记录结束-->
				{/if}
				{if($auth->check('note/day/index'))}
                <!-- 成长记录开始-->
                <div class="tab-pane fade" id="note">
					<div id="note-bar" class="toolbar ">
						<a href="javascript:;" class="btn btn-primary btn-refresh"><i class="fa fa-refresh"></i></a>
					</div>
                    <table id="note-table" class="table table-striped table-bordered table-hover table-nowrap"
                           data-operate-edit1="{:$auth->check('note/day/edit')}"
                           data-operate-del1="{:$auth->check('note/day/del')}"
						   width="100%"></table>
                </div>
                <!-- 成长记录结束-->
				{/if}
				{if($auth->check('workteam/project/index'))}
                <!-- 项目开始-->
                <div class="tab-pane fade" id="project">
					<div id="toolbar-project" class="toolbar ">
						<a href="javascript:;" class="btn btn-primary btn-refresh"><i class="fa fa-refresh"></i></a>
						{if($auth->check('workteam/project/add'))}
						<a href="javascript:;" data-url="workteam/project/add/customer_id/{:input('ids')}" class="btn btn-success  btn-dialog "
						   title="添加项目"><i class="fa fa-plus"></i> {:__('添加')}</a>
						{/if}
					</div>
                    <table id="project-table" class="table table-striped table-bordered table-hover table-nowrap" width="100%"
						   data-operate-add="{:$auth->check('workteam/project/add')}"
						   data-operate-edit="{:$auth->check('workteam/project/edit')}"
					></table>
                </div>
                <!-- 项目结束-->
				{/if}
				{if($auth->check('facrm/customer/contacts/index'))}
                <!-- 联系人开始-->
                <div class="tab-pane fade" id="forum">
					<div id="toolbar2" class="toolbar ">
						<a href="javascript:;" class="btn btn-primary btn-refresh"><i class="fa fa-refresh"></i></a>
						{if($auth->check('facrm/customer/contacts/add'))}
						<a href="javascript:;" data-url="facrm/customer/contacts/add/customer_id/{:input('ids')}" class="btn btn-success  btn-dialog "
						   title="添加联系人"><i class="fa fa-plus"></i> {:__('添加')}</a>
						{/if}
					</div>
                    <table id="contact" class="table table-striped table-bordered table-hover table-nowrap" width="100%"
                           data-operate-edit="{:$auth->check('facrm/customer/contacts/edit')}"
                           data-operate-del="{:$auth->check('facrm/customer/contacts/del')}"
                           data-operate-email="{:$auth->check('facrm/apps/email/send')}"
                           data-operate-sms="{:$auth->check('facrm/apps/sms/send')}">


                    </table>
                    <!-- 修改 amplam2018年8月13日 10:30:05--->
                </div>
                <!-- 联系人结束-->
				{/if}

				{if($auth->check('assess/point/index'))}
				<!-- 28项评估开始-->
				<div class="tab-pane fade" id="assess">
					<div id="toolbar-assess" class="toolbar ">
						<a href="javascript:;" class="btn btn-primary btn-refresh"><i class="fa fa-refresh"></i></a>
						{if($auth->check('assess/point/add'))}
						<a href="javascript:;" data-url="{:url('assess/point/add',['customer_id'=>$row.id])}" data-area='["80%","80%"]' class="btn btn-success  btn-dialog " title="添加28项评估"><i class="fa fa-plus"></i> {:__('添加')}</a>
						{/if}
					</div>
					<table id="t-assess" class="table table-striped table-bordered table-hover table-nowrap" width="100%"></table>
				</div>
				<script id="assess-tpl" type="text/html">
					<div class="col-sm-10 col-md-10">
						<div class="assess-echart" data-date="<%=item.add_time_text%>" data-relation="<%=item.relation%>" style="height:300px;width:100%;"><textarea class="hide"><%=item.points%></textarea></div>
					</div>
					<div class="col-sm-2 col-md-2" style="justify-content: center">
						<p>
							{if $auth->check('assess/point/edit')}
							<a href="#" data-url="assess/point/edit/ids/<%=item.id%>" data-area='["80%","80%"]' class="btn btn-primary btn-dialog" data-id="<%=item.id%>" data-table-id="t-assess" data-refresh=true data-title="重新评分"><i class="fa fa-pencil"></i> 编辑</a>
							{/if}
							{if $auth->check('assess/point/del')}
							<a href="#" data-url="assess/point/del/ids/<%=item.id%>" class="btn btn-danger btn-ajax" data-id="<%=item.id%>" data-table-id="t-assess" data-refresh=true data-confirm="确认删除评分记录？"><i class="fa fa-times"></i> 删除</a>
							{/if}
						</p>
					</div>
				</script>
				<!-- 28项评估结束-->
				{/if}
                {if($auth->check('facrm/business/index'))}
                <!-- 商机开始-->
                <div class="tab-pane fade" id="business">
					 <div id="toolbar-business" class="toolbar ">
						<a href="javascript:;" class="btn btn-primary btn-refresh"><i class="fa fa-refresh"></i></a>
						{if($auth->check('facrm/business/index/add'))}
						<a href="javascript:;" data-url="facrm/business/index/add/customer_id/{:input('ids')}" class="btn btn-success  btn-dialog "
						   title="添加商机"><i class="fa fa-plus"></i> {:__('添加')}</a>
						{/if}
					</div>
                    <table id="t-business" class="table table-striped table-bordered table-hover table-nowrap" width="100%"></table>
                </div>
                <!-- 商机结束-->
                {/if}
                {if($auth->check('facrm/customer/index/contractlist'))}
                <!-- 合同开始-->
                <div class="tab-pane fade" id="contract">
					{if($auth->check('facrm/customer/index/contractlist'))}
					<div id="toolbar-contract" class="toolbar ">
						<a href="javascript:;" class="btn btn-primary btn-refresh"><i class="fa fa-refresh"></i></a>
						{if($auth->check('facrm/contract/index/contractadd'))}
						<a href="javascript:;" data-url="facrm/contract/index/contractadd/customer_id/{$row.id}" class="btn btn-success  btn-dialog "
						   title="添加合同"><i class="fa fa-plus"></i> {:__('添加')}</a>
						{/if}
					</div>
					{/if}
                    <table id="t-contract" class="table table-striped table-bordered table-hover table-nowrap" width="100%"></table>
                </div>
                <!-- 合同结束-->
                {/if}


                {if($auth->check('facrm/customer/index/receivableslist'))}
                <!-- 回款开始-->
                <div class="tab-pane fade" id="receivables">

                    <div class="panel-group" id="accordion">

                        <div class="panel panel-warning">
                            <div class="panel-heading">
                                <h4 class="panel-title">
                                    <a data-toggle="collapse"
                                       href="#panelplan">
                                        未回款计划
                                    </a>
                                </h4>
                            </div>

                            <div id="panelplan" class="panel-collapse collapse in">
                                <div class="panel-body">
                                    <table id="t-plan" class="table table-striped table-bordered table-hover table-nowrap" width="100%"></table>
                                </div>
                            </div>
                        </div>


                        <div class="panel panel-success">
                            <div class="panel-heading">
                                <h4 class="panel-title">
                                    <a data-toggle="collapse"
                                       href="#panelreceivables">
                                        回款列表
                                    </a>
                                </h4>
                            </div>

                            <div id="panelreceivables" class="panel-collapse collapse in">
                                <div class="panel-body">
                                    <div id="toolbar-receivables" class="toolbar ">
                                        <a href="javascript:;" class="btn btn-primary btn-refresh"><i class="fa fa-refresh"></i></a>
                                        {if($auth->check('facrm/contract/receivables/receivablesadd'))}
                                        <a href="javascript:;" data-url="facrm/contract/receivables/receivablesadd/customer_id/{:input('ids')}" class="btn btn-success  btn-dialog "
                                           title="添加回款"><i class="fa fa-plus"></i> {:__('添加')}</a>
                                        {/if}
                                    </div>
                                    <table id="t-receivables" class="table table-striped table-bordered table-hover table-nowrap" width="100%"></table>
                                </div>
                            </div>
                        </div>


                    </div>




                </div>
                <!-- 回款结束-->
                {/if}

				{if($auth->check('facrm/customer/record/files'))}
                <!-- 附件-->
                <div class="tab-pane fade" id="files12">
                    <table id="t-files" class="table table-striped table-bordered table-hover table-nowrap" width="100%"></table>
                </div>
                <!-- 附件-->
				{/if}
            </div>
        </div>
    </div>